package com.wfu.module_local_video.adapter.viewholder;

import android.net.Uri;
import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.wfu.module_base.glide.GlideApp;
import com.wfu.module_local_video.R;

import java.io.File;

/**
 * Describe:
 * Author: wfy
 * Version:
 * Create by (wfy) on 2018/5/10 4:01
 * <p>
 * company :
 */
public class MobileViewHolder extends BaseViewHolder {
    public MobileViewHolder(View view) {
        super(view);
    }

    public MobileViewHolder setImageFile(int viewId, String filePath) {
        ImageView view = getView(viewId);
        GlideApp.with(itemView)
                .load(Uri.fromFile(new File(filePath)))
                .placeholder(R.drawable.video_default_icon)
                .into(view);
        return this;
    }
}
